#ifndef COPI_OSWINDOW_H_
#define COPI_OSWINDOW_H_

#include "d3d11.h"

#define COPI_DEFAULT_FONT_NAME "./fonts/mh.ttf"
#define COPI_DEFAULT_FONT_SIZE 18

#if __cplusplus
extern "C" {
#endif

struct oswindow
{
    ID3D11Device*           device;
    ID3D11DeviceContext*    deviceContext;
    IDXGISwapChain*         swapChain;
    ID3D11RenderTargetView* renderTargetView;
    HWND                    hwnd;
    float                   bg [4];
};

typedef void ( *loop_callback_t )( int, int );

void copi_os_window_open( struct oswindow* windata );
void copi_os_window_close( struct oswindow* windata );
void copi_os_window_loop( struct oswindow* windata, loop_callback_t callback );

#if __cplusplus
};
#endif

#endif
